package com.fs.domain;


import com.fasterxml.jackson.annotation.JsonFormat;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description  订单模型
 * @Author susu
 * @Date 2024/10/15
 */
@Data
public class Orders {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id; // 订单id
    private Long userId; // 订单所属人
    private Long serveTypeId; // 服务类型id
    private String serveTypeName; // 服务类型名称
    private Long serveItemId; // 服务项id
    private String serveItemName; // 服务项名称
    private String serveItemImg; // 服务项图片
    private Integer unit; // 服务单位
    private Long serveId; // 服务id
    private Integer ordersStatus; // 订单状态
    private Integer payStatus; // 支付状态
    private Integer refundStatus; // 退款状态
    private BigDecimal price; // 单价
    private Integer purNum; // 购买数量
    private BigDecimal totalAmount; // 订单总金额
    private BigDecimal realPayAmount; // 实际支付金额
    private BigDecimal discountAmount; // 优惠金额
    private String cityCode; // 城市编码
    private String serveAddress; // 服务详细地址
    private String contactsPhone; // 联系人手机号
    private String contactsName; // 联系人姓名
    private Date serveStartTime; // 服务开始时间
    private Double lon; // 经度
    private Double lat; // 纬度
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date payTime; // 支付时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date evaluationTime; // 评价时间
    private Integer evaluationStatus; // 评价状态
    private Long tradingOrderNo; // 支付服务交易单号
    private String transactionId; // 第三方支付的交易号
    private Long refundNo; // 支付服务退款单号
    private String refundId; // 第三方支付的退款单号
    private String tradingChannel; // 支付渠道
    private Integer display; // 用户端是否展示
    private Long sortBy; // 排序字段
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date realServeEndTime; // 实际服务完成时间
    private Date createTime; // 创建时间
    private Date updateTime; // 更新时间


    public Orders(Long id, Long userId, Long serveTypeId, String serveTypeName, Long serveItemId, String serveItemName, String serveItemImg, Integer unit, Long serveId, Integer ordersStatus, Integer payStatus, Integer refundStatus, BigDecimal price, Integer purNum, BigDecimal totalAmount, BigDecimal realPayAmount, BigDecimal discountAmount, String cityCode, String serveAddress, String contactsPhone, String contactsName, Date serveStartTime, Double lon, Double lat, Date payTime, Date evaluationTime, Integer evaluationStatus, Long tradingOrderNo, String transactionId, Long refundNo, String refundId, String tradingChannel, Integer display, Long sortBy, Date realServeEndTime, Date createTime, Date updateTime) {
        this.id = id;
        this.userId = userId;
        this.serveTypeId = serveTypeId;
        this.serveTypeName = serveTypeName;
        this.serveItemId = serveItemId;
        this.serveItemName = serveItemName;
        this.serveItemImg = serveItemImg;
        this.unit = unit;
        this.serveId = serveId;
        this.ordersStatus = ordersStatus;
        this.payStatus = payStatus;
        this.refundStatus = refundStatus;
        this.price = price;
        this.purNum = purNum;
        this.totalAmount = totalAmount;
        this.realPayAmount = realPayAmount;
        this.discountAmount = discountAmount;
        this.cityCode = cityCode;
        this.serveAddress = serveAddress;
        this.contactsPhone = contactsPhone;
        this.contactsName = contactsName;
        this.serveStartTime = serveStartTime;
        this.lon = lon;
        this.lat = lat;
        this.payTime = payTime;
        this.evaluationTime = evaluationTime;
        this.evaluationStatus = evaluationStatus;
        this.tradingOrderNo = tradingOrderNo;
        this.transactionId = transactionId;
        this.refundNo = refundNo;
        this.refundId = refundId;
        this.tradingChannel = tradingChannel;
        this.display = display;
        this.sortBy = sortBy;
        this.realServeEndTime = realServeEndTime;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    public Orders() {
    }
}
